@echo off
echo ========================================
echo 医疗管理系统认证测试
echo ========================================

set BASE_URL=http://localhost:8081/api
set USERNAME=测试用户
set PASSWORD=12345

echo.
echo 1. 测试应用程序状态...
curl -s %BASE_URL%/health
echo.

echo.
echo 2. 注册新用户: %USERNAME%
curl -X POST %BASE_URL%/auth/register ^
  -H "Content-Type: application/json" ^
  -d "{\"username\":\"%USERNAME%\",\"password\":\"%PASSWORD%\",\"name\":\"测试用户姓名\",\"email\":\"test@example.com\"}"
echo.

echo.
echo 3. 登录获取Token...
curl -X POST %BASE_URL%/auth/login ^
  -H "Content-Type: application/json" ^
  -d "{\"username\":\"%USERNAME%\",\"password\":\"%PASSWORD%\"}"
echo.

echo.
echo 认证测试完成！
pause 